import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopAddressInfoController } from '../../../controllers';
const uctoominishopAddressInfoRouter = new Router();
const minishopAddressInfoController = new uctooMinishopAddressInfoController();

uctoominishopAddressInfoRouter.post('/add', requireUser, minishopAddressInfoController.add);
uctoominishopAddressInfoRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_address_info'), minishopAddressInfoController.edit);
uctoominishopAddressInfoRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_address_info'), minishopAddressInfoController.delete);

//For getting minishopAddressInfo with permission control
uctoominishopAddressInfoRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_address_info'), minishopAddressInfoController.getSingle);
uctoominishopAddressInfoRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_address_info'), minishopAddressInfoController.getMany);
uctoominishopAddressInfoRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_address_info'), minishopAddressInfoController.getMany);

//#endregion AutoCreateCode
export default uctoominishopAddressInfoRouter;
